package com.niiwoo.civet.trade.enums.refund;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 * RefundFundTypeEnum
 * Created by bincun on 2018/6/4.
 */
@Getter
@AllArgsConstructor
public enum RefundFundTypeEnum {
    WITHHOLD_REFUND((byte)1,"代扣还款"),
    BALANCE_REFUND((byte)2,"余额还款");

    private Byte refundType;
    private String desc;
    public static RefundFundTypeEnum enumOf(Byte refundType) {

        for (RefundFundTypeEnum refundTypeEnum : values()) {
            if (refundTypeEnum.refundType.equals(refundType)) {
                return refundTypeEnum;
            }
        }
        throw new RuntimeException("无法找到对应枚举");
    }
}
